home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-14 | 9.0 KB | 355 lines | [TEXT/MPS ] |
- // Copyright ©1994 Apple Computer, Inc.
- // Author: John Powers
- // Date: 13-Mar-94
-
- // UApp.r
- // Resources for UApp.
-
- #define SystemSevenOrLater true
-
- // Standard types
-
- #ifndef __TYPES.R__
- #include "Types.r"
- #endif
-
- #ifndef __SYSTYPES.R__
- #include "SysTypes.r" // needed for version resource
- #endif
-
- // Our application resource constants
-
- #include "::UAppShared.h"
-
- // Include our app's BNDL.
-
- include "UApp.rsrc";
-
- // Include our app's dialogs and alerts.
-
- include "AboutDLOG.rsrc";
- include "AutoStartALRT.rsrc";
- include "DBInfoDLOG.rsrc";
- include "AlertIfError.rsrc";
- include "OpenDLOG.rsrc";
-
- // Include the PICTs used by our app.
-
- include "Picts.rsrc";
-
- // Include Apple event and Finder balloon resources.
-
- include "aete.rsrc";
- include "hfdr.rsrc";
-
- // ResEdit Template
-
- type 'TMPL' {
- array fieldArray {
- pstring;
- literal longint;
- };
- };
-
- //--------------------------------------------------------------------------------
- resource 'MBAR' (rMenuBar, preload) {
- { mApple, mFile, mEdit };
- };
-
- resource 'MBAR' (rMenuBarMo, preload) {
- { mApple, mFile, mEdit, mMoGuide, mWindow };
- };
-
-
- resource 'MENU' (mApple, preload) {
- mApple,
- textMenuProc,
- 0b1111111111111111111111111111101, // Disable dashed line
- enabled,
- apple,
- {
- "About "kProgramName"…", noIcon, nokey, nomark, plain;
- "-", noIcon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, preload) {
- mFile,
- textMenuProc,
- 0b0000000000000000000000000000000,
- enabled,
- "File",
- {
- "Open Database…", noIcon, "O", nomark, plain;
- "Close Database", noIcon, "W", nomark, plain;
- "Get Info...", noIcon, "I", nomark, plain;
- "-", noIcon, nokey, nomark, plain;
- "Quit", noIcon, "Q", nomark, plain;
- }
- };
-
- resource 'MENU' (mEdit, preload) {
- mEdit,
- textMenuProc,
- 0b0000000000000000000000000000000,
- enabled,
- "Edit",
- {
- "Undo", noIcon, "Z", nomark, plain;
- "-", noIcon, nokey, nomark, plain;
- "Cut", noIcon, "X", nomark, plain;
- "Copy", noIcon, "C", nomark, plain;
- "Paste", noIcon, "V", nomark, plain;
- "Clear", noIcon, nokey, nomark, plain;
- "-", noIcon, nokey, nomark, plain;
- "Show Clipboard", noIcon, nokey, nomark, plain;
- }
- };
-
- resource 'MENU' (mMoGuide, preload) {
- mMoGuide,
- textMenuProc,
- 0b0000000000000000000000000000000,
- enabled,
- "MoGuide",
- {
- "Start Guide", noIcon, nokey, nomark, plain;
- "Quit Guide", noIcon, nokey, nomark, plain;
- "Open Default", noIcon, nokey, nomark, plain;
- "Close Database", noIcon, nokey, nomark, plain;
- "-", noIcon, nokey, nomark, plain;
- "Add Databases", noIcon, nokey, nomark, plain;
- }
- };
-
- resource 'MENU' (mWindow, preload) {
- mWindow,
- textMenuProc,
- 0b0000000000000000000000000000000,
- enabled,
- "Window",
- {
- "Art Window", noIcon, nokey, nomark, plain;
- "Reset", noIcon, nokey, nomark, plain;
- "Shuffle", noIcon, nokey, nomark, plain;
- "-", noIcon, nokey, nomark, plain;
- "Feedback Window", noIcon, nokey, nomark, plain;
- "Context true", noIcon, nokey, nomark, plain;
- "Context beep", noIcon, nokey, nomark, plain;
- }
- };
-
- //--------------------------------------------------------------------------------
- resource 'vers' (1, kProgramName, purgeable) {
- kVersionBytes,
- kVersionNumber,
- kVersionNumber" "kVersionDate " "kCopyright
- };
-
- resource 'vers' (2, kProgramName, purgeable)
- {
- 0x01, 0x00, release, 0x00, verUS,
- "1.0",
- "(by John Powers)"
- };
-
- //--------------------------------------------------------------------------------
- type kCreator as 'STR ';
-
- resource kCreator (0) { // Creator (or Signature)
- kProgramName " " kVersionNumber " " kVersionDate " " kCopyright;
- };
-
- //--------------------------------------------------------------------------------
- resource 'STR#' (kUserStrId, "User strings", purgeable) {
- {
- "This application requires System 7."
- };
- };
-
- //--------------------------------------------------------------------------------
- resource 'STR#' (kFeedbackStrId, "Feedback strings", purgeable) {
- {
- "Context: ",
- "Coach: ",
- "Event: ",
- "Guide: "
- };
- };
-
- //--------------------------------------------------------------------------------
- resource 'STR#' (kFrontWindowStrId, "Front window strings", purgeable) {
- {
- "", // Apple Guide is not running.
- "zzz…", // Apple Guide is sleeping.
- "accw", // Apple Guide access window is showing.
- "prew" // Apple Guide presentation window is showing.
- };
- };
-
- //--------------------------------------------------------------------------------
- resource 'SIZE' (-1) {
- reserved, // reserved
- acceptSuspendResumeEvents, // or ignoreSuspendResumeEvents
- reserved, // reserved
- canBackground, // or cannotBackground
- doesActivateOnFGSwitch, // or needsActivateOnFGSwitch
- backgroundAndForeground, // or onlyBackground
- dontGetFrontClicks, // or getFrontClicks
- ignoreAppDiedEvents, // or acceptAppDiedEvents (for debuggers)
- is32BitCompatible, // or not32BitCompatible
- isHighLevelEventAware, // or notHighLevelEventAware
- localAndRemoteHLEvents, // or onlyLocalHLEvents
- notStationeryAware, // or isStationeryAware
- dontUseTextEditServices, // or useTextEditServices
- reserved,
- reserved,
- reserved,
- 300 * 1024, // preferred
- 200 * 1024 // minimum
- };
-
- //--------------------------------------------------------------------------------
- // A button in the Feedback window.
- // Starts up a guide database.
- resource 'CNTL' (kAssistantCntlID, "Assistant") {
- {0, 0, 14, 72},
- 0, // value
- invisible, // or visible
- 1, // max
- 0, // min
- pushButProcUseWFont, // procID (pushbutton with window font)
- 0, // refCon
- "Assistant" // title - the file name is defined in kResAutoStart.
- };
-
- //--------------------------------------------------------------------------------
- // The window and art objects are linked together by sharing the same id.
- resource 'WIND' (kArt1WindResID, "Art", purgeable) {
- {0, 0, 180, 440},
- noGrowDocProc,
- invisible,
- goAway,
- 0x0,
- "Art",
- centerMainScreen
- };
-
- resource 'WIND' (kClipboardWinResID, "Clipboard", purgeable) {
- {70, 50, 170, 391}, // Same width as PreWin
- documentProc,
- invisible,
- goAway,
- 0x0,
- "Clipboard",
- noAutoCenter
- };
-
- resource 'WIND' (kFeedbackWinResID, "Feedback", purgeable) {
- {45, 25, 120, 175},
- documentProc,
- invisible,
- goAway,
- 0x0,
- "Feedback",
- noAutoCenter
- };
-
- // kResArtObjects
- // Defines all the art objects in the window.
- // The id of the kResArtObjects resource matches the id of its window.
- //
- // Order the objects from front to back.
-
- // Glenn and Pat want to go to Josh and Kay's side.
- // Josh and Kay want to go to Glenn and Pat's side.
- // Bill and Eileen are in the middle, but can't be moved
- // (they can be very stubborn). You can get them
- // to move with a "shuffle". A shuffle randomly
- // reassigns the pieces in their current locations.
- //
- //--------------------------------------------------------------------------------
- type kResArtObjects {
- integer = $$Countof(objects);
- array objects {
- integer; // PICT ID
- integer; // Vertical location
- integer; // Horizonal location
- integer; // layer (0=furthest back)
- integer; // isMoveable (0=cannot move)
- integer; // guide database Sequence ID
- cstring[32]; // name (31 chars + terminator)
- };
- };
-
- resource 'TMPL' (9001, kResArtObjectsLabel, purgeable) {
- {
- "No.Objects", 'OCNT';
- "*****", 'LSTC';
- "PICT ID", 'DWRD';
- "Vert location", 'DWRD';
- "Horiz location", 'DWRD';
- "Layer", 'DWRD';
- "1=IsMoveable", 'DWRD';
- "Guide sequence id", 'DWRD';
- "Name", 'C020'; // 0x0020 bytes long
- "*****", 'LSTE';
- "", 'AWRD';
- }
- };
-
- resource kResArtObjects (kArt1WindResID, "Art Objects", purgeable) {
- {
- // PICT, LocV, LocH, layer, move, sequenceID, name
-
- 1000, 30, 60, 1, 1, 3013, "Glenn";
- 1004, 30, 180, 1, 0, 3014, "Bill";
- 1008, 30, 300, 1, 1, 3015, "Josh";
- 1012, 100, 60, 1, 1, 3016, "Pat";
- 1016, 100, 180, 1, 0, 3017, "Eileen";
- 1020, 100, 300, 1, 1, 3018, "Kay";
- };
- };
-
- //--------------------------------------------------------------------------------
- type kResAutoStart {
- integer none=0, auto=1, self=2; // Auto-start?
- integer stay=0, quit=1; // Quit when guide database closes?
- integer; // guide file type (optional)
- integer; // sequence id (optional, requires type or name)
- pstring; // guide database file name (optional, overrides file type)
- align word;
- };
-
- resource 'TMPL' (9003, kResAutoStartLabel, purgeable) {
- {
- "0=none, 1=auto, 2=self", 'DWRD';
- "0=stay, 1=quit", 'DWRD';
- "Guide file type", 'DWRD';
- "Sequence id", 'DWRD';
- "Guide file name", 'PSTR';
- "", 'AWRD';
- }
- };
-
- // AutoStart options in descending priority:
- //
- // 1. Auto-start self (guide database is contained within this application.)
- // 2. Auto-start with guide file name
- // 3. Auto-start with guide file name with sequence id
- // 4. Auto-start with guide file type
- // 5. Auto-start with guide file type with sequence id
- //
- // In the following example, we don't do an auto-start,
- // but we do specify the preset guide database.
- //
- resource kResAutoStart (130, "AutoStart", purgeable) {
- none, // none, auto, self
- stay, // stay or quit when guide file closes.
- 0, // type = kAHDBTypeHelp (0 for none).
- 0, // sequence id (0 for none)
- "Assistant" // File name (overrides file type)
- };
-
-
-